<!DOCTYPE html>
<html >
<head>
	<meta charset="UTF-8">
	<title>blog</title>
	 <link rel="stylesheet" href="js/nivo/Nivo-Slider-master/themes/default/default.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="js/nivo/Nivo-Slider-master/themes/light/light.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="js/nivo/Nivo-Slider-master/themes/dark/dark.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="js/nivo/Nivo-Slider-master/themes/bar/bar.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="js/nivo/Nivo-Slider-master/nivo-slider.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
  <link rel="stylesheet"  href="style.css">
   <link rel="stylesheet"  href="style.css">
</head>
<body>
<?php
 include("function.php");
 $conn = conn();
 
 ?>
	<div id="head">
        <div class="slider-wrapper theme-default">
            <div id="slider" class="nivoSlider">
              <?php
               $result=mysqli_query($conn,"select * from article where recommend=1 ");
               while($row= mysqli_fetch_assoc($result)){
              ?>
              <img src="<?=$row['img']?>"  data-thumb="<?=$row['img']?>" alt="" />

              <?php
              }
              ?> 

            </div>
            
        </div>
        <?php
        $result=mysqli_query($conn,"select * from catalog  ");
        ?>
	<?php
	include("public.php");
	?>
	</div>
	<?php
          $result=mysqli_query($conn,"select * from article  ");
          while($row= mysqli_fetch_assoc($result)){
	    ?>
	<div id="main">
	    <div id="item">
	    
	      <img src="<?php  echo $row['img'] ?>">
	      <p class="title"><a href="title-line.php?id=<?php  echo $row['id'] ?>"><?php  echo $row['title'] ?></a><span><?php  echo $row['view'] ?>人看过</span></p>
	      <p class="time"><?php  echo date("Y-m-d H:i:s", $row['create_time'] )?></p>
	      <p class="content"><?php  echo $row['desc'] ?></p>
	    </div>
			
	</div>

 <?php
   }
  ?>




</body>
<script type="text/javascript" src="js/nivo/Nivo-Slider-master/demo/scripts/jquery-1.9.0.min.js"></script>
    <script type="text/javascript" src="js/nivo/Nivo-Slider-master/jquery.nivo.slider.js"></script>
    <script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider();
    });
    </script>
</html>